﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AgentQltySvrMgrList.aspx.cs" Inherits="IHISCETeim.Web.AgentSys.SvrMgr.AgentQltySvrMgrList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>服务经理-品情审核</title>
</head>
<body>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
        <f:Panel ID="Panel1" runat="server" BodyPadding="2px"  
            ShowBorder="false" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"
            ShowHeader="false">
            <Items>
                <f:Form ID="Form2" runat="server" Height="36px" BodyPadding="2px 1px" ShowHeader="false"
                    ShowBorder="false" LabelAlign="Right" >
                    <Rows>
                        <f:FormRow ID="FormRow1" runat="server">
                            <Items>
                                <f:TwinTriggerBox ID="ttbSearchMessage" runat="server" ShowLabel="false" EmptyText="输入品情号/机号/用户 进行搜索"
                                    Trigger1Icon="Clear" Trigger2Icon="Search" ShowTrigger1="false" OnTrigger2Click="ttbSearchMessage_Trigger2Click"
                                    OnTrigger1Click="ttbSearchMessage_Trigger1Click">
                                </f:TwinTriggerBox>
                                <f:RadioButtonList ID="rblSearchSvrAct" AutoPostBack="true" OnSelectedIndexChanged="rblSearchSvrAct_SelectedIndexChanged"
                                    Label="审核状态" ColumnNumber="3" runat="server">
                                    <f:RadioItem Text="全部"  Value="all" />
                                    <f:RadioItem Text="未审" Value="my" Selected="true"/>
                                </f:RadioButtonList>                            
                            </Items>
                        </f:FormRow>
                    </Rows>
                </f:Form>
                <f:Grid ID="Grid1" runat="server" BoxFlex="1" ShowBorder="true" ShowHeader="false"
                    EnableCheckBoxSelect="false"  EnableColumnLines="true" 
                    DataKeyNames="QltyId" AllowSorting="true" OnSort="Grid1_Sort"  SortField="QltyId"
                    SortDirection="DESC" AllowPaging="true" IsDatabasePaging="true" OnPageIndexChange="Grid1_PageIndexChange" OnRowDataBound="Grid1_RowDataBound" >
                    <Toolbars>
                        <f:Toolbar ID="Toolbar1" runat="server">
                            <Items>
                                <f:Button ID="btnNew" runat="server" Icon="Add" EnablePostBack="false" Text="填写品情" OnClientClick="openAddAgentQlty();" Hidden="true"></f:Button>
                                <f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>                               
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <PageItems>
                        <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                        </f:ToolbarSeparator>
                        <f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数：">
                        </f:ToolbarText>
                        <f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged"
                            runat="server">
                            <f:ListItem Text="10" Value="10" />
                            <f:ListItem Text="20" Value="20" />
                            <f:ListItem Text="50" Value="50" />
                            <f:ListItem Text="100" Value="100" />   
                        </f:DropDownList>
                    </PageItems>
                    <Columns>
                        <f:RowNumberField Width="30px" EnablePagingNumber="true" TextAlign="Center" />
                         <f:BoundField DataField="AgentName" SortField="AgentName" Width="100px" HeaderText="经销商" />                        
                        <f:TemplateField HeaderText="品情号"  Width="100px" SortField="ClaimsNumber" >
                            <ItemTemplate>
                                <a href="javascript:openAgentQltySvrAct(<%# Eval("QltyId") %>,'<%# Eval("ClaimsNumber") %>')" title="打开品情"><%# Eval("ClaimsNumber") %></a>
                            </ItemTemplate>
                        </f:TemplateField>                                                        
                        <f:BoundField DataField="IssueDate" SortField="IssueDate" Width="100px" HeaderText="发行日期" DataFormatString="{0:yyyy-MM-dd}" /> 
                        <f:BoundField DataField="SerialNumber" SortField="SerialNumber" Width="100px" HeaderText="机号" />
                        <f:BoundField DataField="MachineType" SortField="MachineType" Width="80px" HeaderText="机型" /> 
                        <f:BoundField DataField="CustomerName" SortField="CustomerName" HeaderText="用户" Width="80px" /> 
                        <f:BoundField DataField="FaultDate" SortField="FaultDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="故障日" NullDisplayText="" Width="100px" />  
                        <f:BoundField DataField="WorkHour"  SortField="WorkHour" HeaderText="工作小时" NullDisplayText="0" Width="80px" />      
                        <f:BoundField DataField="ReportUser"  SortField="ReportUser" HeaderText="报告人" NullDisplayText=""  />
                        <f:BoundField DataField="ReportTel"  SortField="ReportTel" HeaderText="联系电话" NullDisplayText=""  />
                        <f:TemplateField HeaderText="品情状态"  Width="100px" SortField="ClaimState" ExpandUnusedSpace="true" >
                            <ItemTemplate>
                                <asp:HyperLink ID="hlClaimState" runat="server" NavigateUrl="javascript:return false" Text='<%# Eval("ClaimState") %>' ToolTip=""></asp:HyperLink>
                            </ItemTemplate>
                        </f:TemplateField>
                        <f:BoundField Width="90px" HeaderText="服务担当"  DataField="SrvActRealName" />                                                           
                    </Columns>
                </f:Grid>
            </Items>
        </f:Panel>        
    </form>
    <script type="text/javascript">
        var basePath = '<%= ResolveUrl("~/AgentSys/") %>';
        function openAgentQltySvrAct(QltyId, ClaimsNumber) {
            var rel = "AgentQltySvrMgrEdit" + ClaimsNumber;
            var url = "SvrMgr/AgentQltySvrMgrEdit.aspx?QltyId=" + QltyId;
            var title = '审核[' + ClaimsNumber + ']品情';
            var options = { width: 850, height: 450, max: false, mask: true, maxable: false, minable: false, fresh: true, resizable: false, drawable: true };
            top.navTab.openTab(rel, url, { title: title, fresh: true, external: true });
            return false;
           // parent.addExampleTab.apply(null, ['AgentQltySvrMgrEdit' + ClaimsNumber, basePath + 'SvrMgr/AgentQltySvrMgrEdit.aspx?QltyId=' + QltyId, '审核[' + ClaimsNumber + ']品情', '', true]);
        }
    </script>
</body>
</html>
